package com.fox.xn.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.fox.xn.model.Answer;

public class AnswerMapper implements RowMapper<Answer> {

	@Override
	public Answer mapRow(ResultSet rs, int rownum) throws SQLException {
		Answer an  = new Answer();
		an.setId(rs.getInt("id"));
		an.setDoAt(rs.getDate("do_at"));
		an.setIp(rs.getString("ip"));
		an.setName(rs.getString("name"));
		an.setPhone(rs.getString("phone"));
		an.setUa(rs.getString("ua"));
		return an;
	}
	
}
